<template>
  <div id="app">
   
    <router-link to='/home' tag="button" replace active-class="active">11</router-link>
    <router-link to='/about' tag="button" replace active-class="active">22</router-link>
    <router-link :to="'/user/'+userid" tag="button" replace active-class="active">user</router-link>
    <router-link :to="{path:'/profile',query:{name:'why',}}"></router-link>
    <!-- <button @click="homeclick">11</button>
    <button @click="aboutclick">11</button> -->
     <router-view/>
     <!-- {{userid}} -->
  </div>
</template>

<script>
export default {
  name: "App",
  data(){
    return {
      userid:'zhagns'
    }
  },
 
  methods:{

    homeclick(){
      this.$router.push({
        path:'/profile',
        query:{
          name:'koba',
          age:19,
          home:1221
        }
      })
      // this.$router.push('/home');
      this.$router.replace('/home');
       console.log('homeclick');
    },
    aboutclick(){
      this.$router.push('/about');
       console.log('aboutclick');
    }
  }
};
</script>

<style>

</style>
